//查看n秒后关闭
params ["_target", "_dis", "_time", "_h"];
if(isNull _target)exitWith{};

if(isNil "as_cam_to_unit")then{
	as_cam_to_unit = false;
};

if(as_cam_to_unit)exitWith{};
as_cam_to_unit = true;


showCinemaBorder true;
//titlecut ["kill shot","BLACK IN",1];

_pos = (eyePos _target) getPos [20, getDir _target];
_pos = _pos vectorAdd [0,0,10];


_camera = "camera" camcreate _pos;//[0,0,0];
_camera cameraeffect ["internal","back"];

//setAccTime 0.2;

//;comment "8:07:05";
_pos = (eyePos _target) getPos [_dis, getDir _target];
_pos = _pos vectorAdd [0,0,_h];

_camera camPrepareTarget _target;
_camera camPreparePos _pos;//(_target modelToWorld [0,7,1]);
_camera camPrepareFOV 0.5;
_camera camCommitPrepared 3;
camUseNVG (sunOrMoon < 1);

sleep (5 + _time);

_camera cameraeffect ["terminate","back"];
camdestroy _camera;
as_cam_to_unit = false;

//titlecut ["good luck","BLACK IN",2];